import { game } from "../../../../script/game/control/game";
import { ListViewAdapter } from "../../../../script/util/ListView/ListViewAdapter";
import { ccs } from "../../../../script/util/services";
import { WinBase } from "../../../../script/wins/WinBase";

const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends WinBase {
    
    @property(ListViewAdapter)
    list: ListViewAdapter = null;
    
    start () {
        this.registerEvent("refreshCard", () => {
            this.updateItems();
        })
    }
    updateItems() {
        let items = game.cardMgr.getCard();
        this.list.updateItems(items);
    }
}
